Skip to content

Add bootnode cli#381

Merged
cffls merged 1 commit into
v0.3.0-devfrom
jc/clidoc
May 10, 2022
Merged

Add bootnode cli#381
cffls merged 1 commit into
v0.3.0-devfrom
jc/clidoc

Conversation

@cffls

@cffls cffls commented May 4, 2022

Copy link
Copy Markdown
Contributor

This change is mostly copied from v3's bootnode implementation [1]

bootnode is a binary currently built from bootnode module [2] under cmd. Other than serving as a bootnode (for p2p), we also use it during setup of validator and sentry node to get their node ids, see example here. In the new CLI (v0.3.0), our goal is to change bootnode from a standalone binary to a subcommand under bor binary. In branch v0.3.0-dev, this bootnode binary is already removed from installation package (e.g. .deb, .rpm). This commit is to make bootnode as a subcommand of bor. Eventually, we will remove the original bootnode module [2] and keep the new file introduced in this commit.

[1] v3 bootnode: https://github.com/maticnetwork/v3/blob/main/internal/cli/bootnode.go
[2] bootnode module: https://github.com/maticnetwork/bor/blob/master/cmd/bootnode/main.go

@cffls cffls requested review from 0xsharma and manav2401 May 4, 2022 18:29
@JekaMas

JekaMas commented May 5, 2022

Copy link
Copy Markdown
Contributor

Could you give me a bit of a context, why we need this change? What is the goal?

@cffls

cffls commented May 5, 2022

Copy link
Copy Markdown
Contributor Author

Could you give me a bit of a context, why we need this change? What is the goal?

Added the context to the PR's description. Thanks!

@cffls cffls requested a review from vcastellm May 6, 2022 18:01
Comment thread internal/cli/bootnode.go
Comment thread internal/cli/flagset/flagset.go Outdated
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

Merging #381 (ad8bede) into v0.3.0-dev (a131e42) will decrease coverage by 0.05%.
The diff coverage is 0.00%.

@@              Coverage Diff               @@
##           v0.3.0-dev     #381      +/-   ##
==============================================
- Coverage       55.89%   55.84%   -0.06%     
==============================================
  Files             600      601       +1     
  Lines           69416    69537     +121     
==============================================
+ Hits            38801    38831      +30     
- Misses          27256    27353      +97     
+ Partials         3359     3353       -6     
Impacted Files Coverage Δ
internal/cli/bootnode.go 0.00% <0.00%> (ø)
internal/cli/command.go 0.00% <0.00%> (ø)
core/state_prefetcher.go 85.18% <0.00%> (-7.41%) ⬇️
les/distributor.go 75.78% <0.00%> (-3.13%) ⬇️
les/odr.go 89.02% <0.00%> (-1.22%) ⬇️
p2p/peer.go 74.62% <0.00%> (-1.00%) ⬇️
eth/downloader/skeleton.go 76.45% <0.00%> (-0.51%) ⬇️
les/downloader/downloader.go 75.36% <0.00%> (-0.11%) ⬇️
core/blockchain.go 62.88% <0.00%> (+0.09%) ⬆️
eth/protocols/snap/sync.go 71.72% <0.00%> (+0.22%) ⬆️
... and 12 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a131e42...ad8bede. Read the comment docs.

@vcastellm vcastellm left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@cffls cffls merged commit a885651 into v0.3.0-dev May 10, 2022
@temaniarpit27 temaniarpit27 deleted the jc/clidoc branch June 8, 2022 06:55
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

Successfully merging this pull request may close these issues.

4 participants