-
Notifications
You must be signed in to change notification settings - Fork 344
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
feat: command to convert peers.txt
into addrbook.json
#2623
Conversation
Running using a modified mocha-4.sh script and encountered
|
Codecov Report
@@ Coverage Diff @@
## main #2623 +/- ##
==========================================
- Coverage 19.93% 19.62% -0.31%
==========================================
Files 139 139
Lines 16702 16999 +297
==========================================
+ Hits 3329 3336 +7
- Misses 13051 13341 +290
Partials 322 322 |
just hanging here... so I don't think it's actually connecting to any of these peers |
Moved this from Mainnet milestone to Post-Mainnet milestone b/c it doesn't need to be merged to celestia-app prior to cutting the v1.x release.
|
Enabled debug logs
|
Was able to get the node to start by specifying:
|
Testing again and encountering a lot of this
|
Relevant: celestiaorg/networks#349 |
Ayy this works for arabica-10:
|
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.
Would it make sense to add more documentation to this? For example, in which format the input file should be and also the output
Yea can add more docs pre merge, good point! I had a README.md before but deleted it in the migration to be a subcommand under |
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, included some suggestions.
Co-authored-by: Sanaz Taheri <[email protected]>
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!
…g#2623) Closes celestiaorg#2619 ## Description Adds a new command to celestia-appd called `addrbook`. ``` ./build/celestia-appd addrbook --help Convert a list of peers into an address book. The first argument (peers.txt) should contain a new line separated list of peers. The format for a peer is `id@ip:port` or `id@domain:port`. The second argument (addrbook.json) should be the output filename. The address book is saved to the output file in JSON format. Usage: celestia-appd addrbook peers.txt addrbook.json [flags] ``` ## Testing I was able to run a node on arabica-10 with an `addrbook.json` that was created from [arabica-10/peers.txt](https://github.com/celestiaorg/networks/blob/master/arabica-10/peers.txt). Note, testing failed on mocha-4 due to celestiaorg/networks#349
Backports #2623 and #2783 ## Testing ``` $ ./build/celestia-appd addrbook ~/git/rootulp/celestia/networks/celestia/peers.txt ~/Downloads/addrbook.json Error adding [email protected]:26656: Cannot add non-routable address [email protected]:26656 Converted /Users/rootulp/git/rootulp/celestia/networks/celestia/peers.txt into /Users/rootulp/Downloads/addrbook.json $ head -n 10 /Users/rootulp/Downloads/addrbook.json { "key": "8957397890a66cd0f716cbc9", "addrs": [ { "addr": { "id": "a41b4bc451b1b71d537aa1018226e08d7fa7e44e", "ip": "5.255.77.44", "port": 26656 }, "src": { ```
Closes #2619
Description
Adds a new command to celestia-appd called
addrbook
.Testing
I was able to run a node on arabica-10 with an
addrbook.json
that was created from arabica-10/peers.txt. Note, testing failed on mocha-4 due to celestiaorg/networks#349